<?php

namespace app\admin\model;

use app\common\model\TimeModel;

class IndexRule extends TimeModel
{

    protected $name = "index_rule";

    protected $deleteTime = "delete_time";

    public static $statusList = ['disable' => '禁用', 'enable' => '启用', 'public' => '公共库',];


    public function getStatusList()
    {
        return static::$statusList;
    }

    public function getPublicStatusList()
    {
        return ['not' => '未正式收录', 'apply' => '正式收录',];
    }

    public function getStatusNameAttr()
    {
        $list_status = $this->getStatusList();

        return $list_status[$this->getAttr('status')];
    }
    public function getPublicStatusNameAttr()
    {
        $list_status = $this->getPublicStatusList();

        return $list_status[$this->getAttr('public_status')];
    }
}
